package com.oig.sys.auth.vo;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@Schema(description = "角色视图对象")
public class RoleVo {

    @Schema(description = "注解id")
    private Integer id;

    @Schema(description = "角色代码")
    private String roleCode;

    @Schema(description = "角色名称")
    private String roleName;

    @Schema(description = "租户id")
    private Integer tenantId;
    @Schema(description = "租户编码")
    private String tenantCode;
    @Schema(description = "租户名")
    private String tenantName;

    @Schema(description = "添加人")
    private String createUserName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "添加时间")
    private Date createTime;

    @Schema(description = "最后修改人")
    private String lastUpdateName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "最后修改时间")
    private Date lastUpdateTime;

    @Schema(description = "是否允许删除 1-允许 0-不允许")
    private String noDelFlag;

    @Schema(description = "角色应用权限列表")
    private List<SystemVo> roleSystemList;
    @Schema(description = "角色菜单权限列表")
    private List<ResourceVo> roleResourceList;
    @Schema(description = "角色接口权限列表")
    private List<PermissionVo> rolePermissionList ;

    public RoleVo(){}

    public RoleVo(Integer id, String roleCode, String roleName, Integer tenantId, String tenantCode,String tenantName,
                  String createUserName, Date createTime, String lastUpdateName, Date lastUpdateTime, String noDelFlag){
        this.id = id;
        this.roleCode = roleCode;
        this.roleName = roleName;
        this.tenantId = tenantId;
        this.tenantCode = tenantCode;
        this.tenantName = tenantName;
        this.createUserName = createUserName;
        this.createTime = createTime;
        this.lastUpdateName = lastUpdateName;
        this.lastUpdateTime = lastUpdateTime;
        this.noDelFlag = noDelFlag;
    }

}
